package com.example.webtest.controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@Controller
public class view {

	@RequestMapping("/")
	public String home(){
		return "home";
	}

	@RequestMapping("/success")
	public String success(){
		return "success";
	}



	@RequestMapping("/getparam")
	@ResponseBody
	public String get(@RequestBody JSONObject object){
		String name = object.getString("name");
		return name;
	}
}
